*** Variables ***
${url}            http://localhost
${port}           8081

*** Keywords ***
addColumnSelf
    [Arguments]    ${name}    ${user_id}
    &{dict}    Create Dictionary    name=${name}    user_id=${user_id}
    Create Session    api    ${url}:${port}
    ${result}=    Post On Session    api    url=/column-self/add    params=${dict}
    Dictionary Should Contain Key    ${result.json()}    code
    Should Be Equal    ${result.json().get("code")}    ${0}
    log    ${result.json().get("code")}

addComment
    [Arguments]    ${discussPostId}    ${userIdFrom}    ${content}    ${create_time}
    &{dict}    Create Dictionary    discussPostId=${discussPostId}    userIdFrom=${userIdFrom}    content=${content}    create_time=${create_time}
    Create Session    api    ${url}:${port}
    ${result}=    Post On Session    api    url=/comment/comment    params=${dict}
    Dictionary Should Contain Key    ${result.json()}    code
    Should Be Equal    ${result.json().get("code")}    ${0}
    log    ${result.json().get("code")}
